//------------------------------------------------------------------------------
// <safe-for-custom-code>
//     This code file was provided by Radarc (http://radarc.net) - Radarc version: 3.1.0.0 Formula: Power Template Formula version: 1.3
//
//     It is safe to add and maintain your custom code here. Radarc will not override it unless this file is missing.
// </safe-for-custom-code>
//------------------------------------------------------------------------------

using System.Linq;


namespace ShopPowerTemplate.Entities
{
    public partial class ProductDetail : ProductDetailBase
    {
        public override string IdentityDescription
        {
            get
            {
                string product = Product == null ? string.Empty : Product.ToString();
                string options = Option.Count == 0 ? string.Empty : string.Format(" ({0})", string.Join(", ", Option.Select(o => o.IdentityDescription)));

                return string.Format("{0}{1}", product, options);
            }
        }
	}
}
